//
//  BaseLabel.m
//  JewelryStore
//
//  Created by apple on 2016/11/7.
//  Copyright © 2016年 com. All rights reserved.
//

#import "BaseLabel.h"

@implementation BaseLabel

- (instancetype)initWithTitle:(NSString *)title color:(UIColor *)color font:(UIFont *)font
{
    self = [super init];
    if (self) {
        self.text = title;
        self.textColor = color;
        self.font = font;
    }
    return self;
}

- (NSMutableAttributedString *)setupCenterLineWithOldStr:(NSString *)str
{
    NSMutableAttributedString *mutableStr = [[NSMutableAttributedString alloc] initWithString:str];
    [mutableStr addAttribute:NSStrikethroughStyleAttributeName value:@(NSUnderlinePatternSolid | NSUnderlineStyleSingle) range:NSMakeRange(0, [str length])];
    [mutableStr addAttribute:NSStrikethroughColorAttributeName value:[UIColor lightGrayColor] range:NSMakeRange(0, [str length])];
    return mutableStr;
}
@end
